package com.honghe.mapper;

import com.honghe.dto.PatientDTO;
import com.honghe.entity.Patient;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface PatientMapper {
    @Insert("insert into patient (name, sex, age, phone, password, create_time) values (#{name}, #{sex}, #{age}, #{phone}, #{password}, #{createTime});")
    void addPatient(Patient patient);
    @Select("select * from patient where phone = #{phone};")
    Patient getByPhone(String phone);
    void update(Patient patient);
    @Select("select * from patient where id = #{id};")
    Patient getById(Long id);
}
